<template>
  <div style="background-color: #226699;height: 680px;color: #FFFFFF;width: 100%;overflow: hidden">
    <div style="margin-top: 200px;text-align: center;margin-bottom: 20px">
      <h2>欢迎登录该系统</h2>
    </div>
    <div style="width: 600px;margin: auto">
      <el-form
          :model="RegisterBean"
          status-icon
          ref="loginBean"
          label-width="100px"
          class="demo-ruleForm">
        <el-form-item prop="username">
          <el-input
              prefix-icon="el-icon-user-solid"
              type="text"
              v-model="RegisterBean.username">
          </el-input>
        </el-form-item>
        <el-form-item prop="password">
          <el-input
              prefix-icon="el-icon-lock"
              type="password"
              show-password
              v-model="RegisterBean.password">
          </el-input>
        </el-form-item>
        <el-form-item>
          <el-button style="width: 100%" @click="register()">登录</el-button>
        </el-form-item>
      </el-form>
    </div>

  </div>
</template>

<script>
import request from "@/config/request";

export default {
  name: "Register",
  data(){
    return{
      RegisterBean:{
        username:"",
        password:""
      }
    }
  },
  methods:{
    login(){
      var that=this
      register.post('/api/login/logined', this.loginBean)
          .then(function (response) {
            console.log(response);
            if (response=="ok"){
              that.$router.push("/login")
            }

          })
          .catch(function (error) {
            console.log(error);
          });
    }
  }
}
</script>

<style scoped>

</style>